home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 1998 January / PC Answers Issue 49 Cover CD January 1998.iso / Apps / Director / DATA.Z / Ink Effects.dir / Scripts_52_Performance Scene Handlers.ls < prev    next >
Encoding:
Text File  |  1997-05-10  |  725 b   |  29 lines

  1. on moveObjectPerformance
  2.   global gObjectH
  3.   set currentPosition to the locH of sprite 7
  4.   if currentPosition = 57 then
  5.     startTimer()
  6.   end if
  7.   if (currentPosition = 188) or (currentPosition > 188) then
  8.     set raceTimeTics to the timer
  9.     set the floatPrecision to 2
  10.     set raceTime to float(raceTimeTics / 60.0)
  11.     set the text of member "myTimer" of castLib "text" to string(raceTime)
  12.     updateStage()
  13.     resetPerformance()
  14.   else
  15.     repeat with nn = 7 to 8
  16.       set the locH of sprite nn to currentPosition + 1
  17.       set gObjectH to currentPosition
  18.     end repeat
  19.     updateStage()
  20.   end if
  21. end
  22.  
  23. on resetPerformance
  24.   repeat with nn = 7 to 8
  25.     set the locH of sprite nn to 0
  26.   end repeat
  27.   updateStage()
  28. end
  29.